home *** CD-ROM | disk | FTP | other *** search
- // Copyright (c)1995 Ray Dream, Inc. All Rights Reserved.
- /* $Id: COMBack.h 1.1 1996/07/18 23:45:57 Damien Exp $ */
-
- //
- // COM Example of an Background Shader
- //
-
- #ifndef __COMBACK__
- #define __COMBACK__
-
- #ifndef __I3DEXAB__
- #include "I3DExAB.h"
- #endif
-
- // define the Sunset CLSID
- // ACD41BE0-8243-101C-8BFC-F629D50D262B
- DEFINE_GUID(CLSID_Sunset, 0xACD41BE0L, 0x8243, 0x101C, 0x8B, 0xFC, 0xF6, 0x29, 0xD5, 0x0D, 0x26, 0x2B);
-
-
- typedef struct BackData {
- COLOR3D fSunColor;
- NUM3D fSunDiameter;
- NUM3D fWestDirection;
- COLOR3D fZenithColor;
- COLOR3D fWestColor;
- COLOR3D fEastColor;
- COLOR3D fEarthColor;
- } BackData;
-
-
- // Sunset Object :
- #undef INTERFACE
- #define INTERFACE Sunset
- class Sunset : public I3DExBackground {
- public :
- Sunset();
- ~Sunset();
-
- // IUnknown Interface :
- STDMETHODIMP QueryInterface(THIS_ REFIID riid, LPVOID FAR* ppvObj);
- STDMETHODIMP_(ULONG) AddRef(THIS);
- STDMETHODIMP_(ULONG) Release(THIS);
-
- // I3DExtension method :
- STDMETHODIMP_(I3DExtension*) Clone(THIS);
- STDMETHODIMP ShellUtilitiesInit(THIS_ IShUtilities* shellUtilities);
-
- // I3DExDataExchanger methods :
- STDMETHODIMP_(ExtensionDataMap*) GetExtensionDataMap(THIS);
- STDMETHODIMP_(void*) GetExtensionDataBuffer(THIS);
- STDMETHODIMP ExtensionDataChanged(THIS);
- STDMETHODIMP HandleEvent(THIS_ ULONG sourceID);
- STDMETHODIMP_(short) GetResID(THIS);
-
- // I3DExBackgroundShader methods
- STDMETHODIMP GetBackgroundColor(THIS_ VECTOR3D* direction, COLOR3D* resultColor);
-
- private :
- ULONG fCRef; // reference Counter
- BackData fData; // Sunset Data
- VECTOR3D fWestVector;// Vector which gives the West
- NUM3D fSunLimit; // Limit (cosinus) of the Sun Diameter
- };
-
-
- #endif // __SUNSET__
-
-